<!DOCTYPE html>
<html ng-app="loginCtrl">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Material Admin Login</title>
    <link rel="stylesheet" href="css/angular-material.min.css">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <script src="js/angular-1.4.8.min.js"></script>
    <script src="js/angular-animate.min.js"></script>
    <script src="js/angular-aria.min.js"></script>
    <script src="js/angular-messages.min.js"></script>
    <!-- Angular Material Library -->
    <script src="js/angular-material.min.js"></script>
    <link href="css/Material-Design-Icons/material-icons.css" rel="stylesheet">
</head>

<body class="login-content">
    <form action="login_submit" name="loginform" id="loginform" method="post" ng-controller="AppCtrl" validate>

        <div id="l-login" >
            <md-input-container class="md-block">
                <label>用户名</label>
                <md-icon> person </md-icon>
                <input ng-model="loginuser.name" required>
            </md-input-container>
            <md-input-container class="md-block">
                <label>密 码</label>
                <md-icon> lock </md-icon>
                <input ng-model="loginuser.passowrd" type="passowrd" required>
            </md-input-container>
            <md-input-container class="md-block">
                <label>验证码</label>
                <md-icon> photos </md-icon>
                <input ng-model="loginuser.code" type="text" required md-maxlength="4" style="width:128px; display: inline-block;">
                <span ng-model="codeimg" style="position: absolute; left:188px;  top:-16px; z-index: 10;">
                    <img ng-src="http://localhost:1888/GetCaptcha/{{imgcount}}" ng-click="refshcode()" style=" width:100px;">
                </span>
                <!-- <md-checkbox md-no-ink aria-label="记住我" ng-model="rember" class="md-primary m-l-30 m-t-10 f-r">记住我 -->
            </md-input-container>
            </md-checkbox>
            <md-button class="md-fab btn-login" aria-label="登陆" ng-click="login()" ng-disabled="loginform.$invalid">
                <md-icon>&#xE5C8;</md-icon>
            </md-button>
        </div>
    </form>
</body>

</html>
<script type="text/javascript">
    var app = angular.module('loginCtrl', ['ngMaterial', 'ngMessages']);
    app.controller('AppCtrl', function($scope) {
        $scope.imgcount=1;

        $scope.refshcode=function(){
            $scope.imgcount++;
            // console.log($scope.imgcount);
        }

        $scope.login=function(){
            console.log('我点击了!');
        }




    });


</script>
